package simpleFactory;

public class OperationDiv extends Operation {
    @Override
    public double getResult(double numberA, double numberB) throws Exception {
        double result = 0;
        if (numberB == 0) {
            throw new Exception("除数不能为0");
        }
        result = numberA / numberB;
        return result;
    }
}
